package lueder.sqlutilities;

import java.sql.Connection;
import java.sql.SQLException;

import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;

public class KlkConnectionPooling {
	private final static String RESOURCENAME = "java:comp/env/jdbc/klk";

	public static Connection getConnection() throws NamingException, SQLException {
		
			InitialContext jndiCntx = new InitialContext();
			return ((DataSource) jndiCntx.lookup(RESOURCENAME)).getConnection();
	}
}
